<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>更新工位</title>
    <link rel="stylesheet" href="/static/common/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/common/css/uploadpic.css">
    <link rel="stylesheet" href="/static/common/css/style.css">
    <link rel="stylesheet" href="/static/common/css/webuploader.css">
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=QIw7CEn9awTfvoOMeBoRfA5X4gHVYIB3"></script>
    <style type="text/css">
        .layui-upload-img {
            width: 92px;
            height: 92px;
            margin: 0 10px 10px 0;
        }

        .site-block {
            width: 95%;
            padding: 20px;
            border: 2px solid #eee;
        }

        .site-text {
            position: relative;
        }

        .title-location {
            font-size: 20px;
            font-weight: 600;
        }

        .rightlayer {
            display: inline-block;
        }

        .layui-form-item {
            width: 100%;
            margin-bottom: 0px;
        }

        .layui-inline {
            display: inline-block;
            width: 49% !important;
        }

        .layui-inline-two {
            float: right;
            margin-right: 0px !important;
        }

        .layui-input:focus, .layui-textarea:focus {
            border-color: red !important;
        }

        .layui-form-label {
            overflow: inherit !important;
        }
        .layui-disabled{
            color:black!important;
        }
        .layui-checkbox-disbaled span{
            background-color:''!important;
        }
    </style>
</head>
<body style="margin: 20px 20px ">
<div class="site-text site-block ">
    <form class="layui-form layui-form-pane " lay-filter="stationBranch" action="">
        <div class="layui-form-item">
            <label class="title-location">${object.nickname}-工位信息</label>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">昵称</label>
                <div class="layui-input-block layui-input-margin" style="border: 0px solid #e6e6e6;min-width: 290px">
                    <input type="text" name="nickname" lay-verify="required" autocomplete="on" class="layui-input" disabled="disabled">
                </div>
            </div>
            <div class="layui-inline layui-inline-two">
                <label class="layui-form-label">总面积</label>
                <div class="layui-input-inline" style="width:calc(100% - 166px);">
                    <input type="number" name="area" lay-verify="required|number" autocomplete="on" class="layui-input"  disabled="disabled">
                </div>
                <div class="layui-form-mid layui-word-aux" style="width: 36px;font-size: 18px">㎡</div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属区域</label>
                <div class="layui-input-block">
                    <select name="county_id" lay-verify="required" lay-filter="county"  disabled="disabled">
                        <option value="">请选择区域</option>
                    <#list data as d>
                        <option value="${d.county_id?c}">${d.name}</option>
                    </#list>
                    </select>
                </div>
            </div>
            <div class="layui-inline layui-inline-two">
                <label class="layui-form-label">所属商圈</label>
                <div class="layui-input-block">
                    <select name="trade_area_id" id="tradeArea" lay-filter="tradeArea" lay-verify="required"  disabled="disabled">
                    <#list tradeAreaList as d>
                        <option value="${d.county_id}">${d.name}</option>
                    </#list>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属楼盘</label>
                <div class="layui-input-block">
                    <select name="building_id" id="building_id" lay-filter="building_id" lay-verify="required"  disabled="disabled">
                    <#list officeBuildingsList as d>
                        <option value="${d.building_id}">${d.building_name}</option>
                    </#list>
                    </select>
                </div>
            </div>
            <div class="layui-inline layui-inline-two">
                <label class="layui-form-label">楼层</label>
                <div class="layui-input-block">
                    <input type="text" name="doorplate" lay-verify="required" autocomplete="off" class="layui-input"  disabled="disabled">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">装修风格</label>
                <div class="layui-input-block layui-input-margin" style="border: 0px solid #e6e6e6;min-width: 290px">
                    <input type="text" name="decorate" lay-verify="required" autocomplete="on" class="layui-input"  disabled="disabled">
                </div>
            </div>
            <div class="layui-inline layui-inline-two">
                <label class="layui-form-label">共享工位</label>
                <div class="layui-input-inline" style="width:calc(100% - 166px);">
                    <input type="number" name="stationNum" lay-verify="required|number" autocomplete="on" class="layui-input"  disabled="disabled">
                </div>
                <div class="layui-form-mid layui-word-aux" style="width: 36px;font-size: 18px">个</div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">独立办公室</label>
                <div class="layui-input-inline" style="width:calc(100% - 166px);">
                    <input type="text" lay-verify="required" name="aloneNum" value="" autocomplete="on" class="layui-input"  disabled="disabled">
                </div>
                <div class="layui-form-mid layui-word-aux" style="width: 36px;font-size: 18px">个</div>
            </div>
            <div class="layui-inline layui-inline-two">
                <label class="layui-form-label">会议室</label>
                <div class="layui-input-inline" style="width:calc(100% - 166px);">
                    <input type="text" name="meetingNum" lay-verify="required" autocomplete="on" value="" class="layui-input"  disabled="disabled">
                </div>
                <div class="layui-form-mid layui-word-aux" style="width: 36px;font-size: 18px">个</div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">选址顾问</label>
                <div class="layui-input-block " style="border: 0px solid #e6e6e6;min-width: 290px">
                    <input type="text" lay-verify="required" name="contacts" value="小筷" autocomplete="on" class="layui-input"  disabled="disabled">
                </div>
            </div>
            <div class="layui-inline layui-inline-two">
                <label class="layui-form-label">联系电话</label>
                <div class="layui-input-block">
                    <input type="text" name="phone" lay-verify="required" maxlength="11" value="023-63021910" autocomplete="on" class="layui-input"  disabled="disabled">
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">基础服务(多选)</label>
            <div class="layui-input-block" style="border: 1px solid #e6e6e6;min-width: 290px">
            <#list stationIconList  as icon>
                <#if icon.type=='TYPE_BASICS'>
                    <input type="checkbox" name="${icon.type}[${icon.id?c}]" value="${icon.id?c}" lay-filter="basics" title="${icon.name}" <#if object.basics?contains(icon.id?c+'')> checked</#if>  >
                </#if>
            </#list>
            </div>
            <input type="hidden" name="basics" id="TYPE_BASICS">
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">创业服务(多选)</label>
            <div class="layui-input-block" style="border: 1px solid #e6e6e6;min-width: 290px">
            <#list stationIconList  as icon>
                <#if icon.type=='TYPE_ESTP'>
                    <input type="checkbox" name="${icon.type}[${icon.id?c}]" value="${icon.id?c}" lay-filter="ESTP" title="${icon.name}" <#if object.estp?contains(icon.id?c+'')> checked</#if>  >
                </#if>
            </#list>
            </div>
            <input type="hidden" name="estp" id="TYPE_ESTP">
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">特色服务(多选)</label>
            <div class="layui-input-block" style="border: 1px solid #e6e6e6;min-width: 290px">
            <#list stationIconList  as icon>
                <#if icon.type=='TYPE_FEATURE'>
                    <input type="checkbox" name="${icon.type}[${icon.id?c}]" value="${icon.id?c}"   <#if object.feature?contains(icon.id?c+'')> checked</#if> lay-filter="feature" title="${icon.name}" >
                </#if>
            </#list>
            </div>
            <input type="hidden" name="feature" id="TYPE_FEATURE">
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">入住企业</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容(最多300字)" name="entrepreneur" class="layui-textarea" lay-verify="required" maxlength="300"  disabled="disabled"></textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">其他描述</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容(最多300字)" name="description" class="layui-textarea" maxlength="300" lay-verify="required"  disabled="disabled"></textarea>
            </div>
        </div>
        <div class="layui-form-item " pane>
            <label class="layui-form-label" style="height: 180px!important;">楼盘封面图</label>
            <div class="layui-input-block" style="padding:  2px 2px 2px 15px;height: 180px!important;">
                <div class="layui-input-block">
                    <img class="layui-upload-img" id="demo1" style="margin: 4px -108px;">
                    <p id="demoText" style="margin: 4px -108px;"></p>
                </div>
                <input type="hidden" name="cover_img_path" value="" id="cover_img_path">
            </div>
        </div>
    <#assign text_img=object.context_img_path />
    <#assign data_img=text_img?eval />
        <div class="layui-form-item" pane>
            <label class="layui-form-label">详情图</label>
            <div class="layui-input-block" style="padding: 8px">
            <#list data_img as img>
                <div style="display: inline-block;position: relative;">
                    <img src="${img.minPath}" style="height: 120px;width: 80px;border: 1px solid lightsteelblue;">
                </div>
            </#list>
            </div>
        </div>
    </form>
</div>
</body>
<script type="text/javascript" src="/static/common/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/static/common/layui/layui.js"></script>
<script type="text/javascript">
    function updataImgV(_this, path) {
        var imgJson = JSON.parse($("#uploadPicPath").val());
        var imgJsonNew = new Array();
        for (i = 0; i < imgJson.length; i++) {
            if (imgJson[i].minPath == path) {
                $(_this).parent().remove();
            } else {
                imgJsonNew.push(imgJson[i])
            }
        }
        $("#uploadPicPath").val(JSON.stringify(imgJsonNew));
    }
</script>
<script type="text/javascript">
    layui.use('form', function () {
        var form = layui.form;
        /**************************insulate**********************************/
        //赋值
        form.val('stationBranch',${stationBranchJson});
        var imgPath = $('#cover_img_path').val();
        imgPath = JSON.parse(imgPath);
        $('.layui-upload-img').attr('src', imgPath.minPath);
        /**************************insulate**********************************/
    });
</script>
</html>